package com.witmore.neutron.ai.mcp.server.trading.constants;

/**
 * AKShare API常量定义
 *
 * @author 豆子高
 * @date 2025-01-20
 */
public class AkShareApiConstants {

    /**
     * AKShare API基础URL
     */
    public static final String AKSHARE_API_URL = "http://121.199.16.218:8090/api/public/";

    // ==================== 基础行情接口 ====================

    /**
     * 盘口异动接口
     * API_NAME = stock_changes_em 盘口异动接口
     * symbol="大笔买入";
     * choice of {'火箭发射', '快速反弹', '大笔买入', '封涨停板', '打开跌停板', '有大买盘', '竞价上涨', '高开5日线', '向上缺口', '60日新高', '60日大幅上涨',
     * '加速下跌', '高台跳水', '大笔卖出', '封跌停板', '打开涨停板', '有大卖盘', '竞价下跌', '低开5日线', '向下缺口', '60日新低', '60日大幅下跌'}
     */
    public static final String STOCK_CHANGES_EM = AKSHARE_API_URL + "stock_changes_em?symbol=%s";

    /**
     * 个股信息查询-东财
     * stock_individual_info_em
     */
    public static final String STOCK_INDIVIDUAL_INFO_EM = AKSHARE_API_URL + "stock_individual_info_em?symbol=%s";

    /**
     * 实时行情数据 - 东财
     * 沪深京 A 股
     * 单次返回所有沪深京 A 股上市公司的实时行情数据
     */
    public static final String STOCK_REAL_TIME_INFO_EM = AKSHARE_API_URL + "stock_zh_a_spot_em";



    // ==================== 财务报表相关接口 ====================

    /**
     * 个股研报-东方财富
     * API: stock_research_report_em
     * 描述: 东方财富网-数据中心-研究报告-个股研报
     * 输入参数: symbol="000001"
     */
    public static final String STOCK_RESEARCH_REPORT_EM = AKSHARE_API_URL + "stock_research_report_em?symbol=%s";

    /**
     * 财务报表-新浪
     * API: stock_financial_report_sina
     * 描述: 新浪财经-财务报表-三大报表
     * 输入参数: stock="sh600600", symbol="资产负债表|利润表|现金流量表"
     */
    public static final String STOCK_FINANCIAL_REPORT_SINA = AKSHARE_API_URL + "stock_financial_report_sina?stock=%s&symbol=%s";

    // ==================== 东方财富财务报表接口 ====================

    /**
     * 资产负债表-按报告期-东财
     * API: stock_balance_sheet_by_report_em
     * 描述: 东方财富-股票-财务分析-资产负债表-按报告期
     * 输入参数: symbol="SH600519"
     */
    public static final String STOCK_BALANCE_SHEET_BY_REPORT_EM = AKSHARE_API_URL + "stock_balance_sheet_by_report_em?symbol=%s";

    /**
     * 资产负债表-按年度-东财
     * API: stock_balance_sheet_by_yearly_em
     * 描述: 东方财富-股票-财务分析-资产负债表-按年度
     * 输入参数: symbol="SH600519"
     */
    public static final String STOCK_BALANCE_SHEET_BY_YEARLY_EM = AKSHARE_API_URL + "stock_balance_sheet_by_yearly_em?symbol=%s";

    /**
     * 利润表-按报告期-东财
     * API: stock_profit_sheet_by_report_em
     * 描述: 东方财富-股票-财务分析-利润表-报告期
     * 输入参数: symbol="SH600519"
     */
    public static final String STOCK_PROFIT_SHEET_BY_REPORT_EM = AKSHARE_API_URL + "stock_profit_sheet_by_report_em?symbol=%s";

    /**
     * 利润表-按年度-东财
     * API: stock_profit_sheet_by_yearly_em
     * 描述: 东方财富-股票-财务分析-利润表-按年度
     * 输入参数: symbol="SH600519"
     */
    public static final String STOCK_PROFIT_SHEET_BY_YEARLY_EM = AKSHARE_API_URL + "stock_profit_sheet_by_yearly_em?symbol=%s";

    /**
     * 利润表-按单季度-东财
     * API: stock_profit_sheet_by_quarterly_em
     * 描述: 东方财富-股票-财务分析-利润表-按单季度
     * 输入参数: symbol="SH600519"
     */
    public static final String STOCK_PROFIT_SHEET_BY_QUARTERLY_EM = AKSHARE_API_URL + "stock_profit_sheet_by_quarterly_em?symbol=%s";

    /**
     * 现金流量表-按报告期-东财
     * API: stock_cash_flow_sheet_by_report_em
     * 描述: 东方财富-股票-财务分析-现金流量表-按报告期
     * 输入参数: symbol="SH600519"
     */
    public static final String STOCK_CASH_FLOW_SHEET_BY_REPORT_EM = AKSHARE_API_URL + "stock_cash_flow_sheet_by_report_em?symbol=%s";

    /**
     * 现金流量表-按年度-东财
     * API: stock_cash_flow_sheet_by_yearly_em
     * 描述: 东方财富-股票-财务分析-现金流量表-按年度
     * 输入参数: symbol="SH600519"
     */
    public static final String STOCK_CASH_FLOW_SHEET_BY_YEARLY_EM = AKSHARE_API_URL + "stock_cash_flow_sheet_by_yearly_em?symbol=%s";

    /**
     * 现金流量表-按单季度-东财
     * API: stock_cash_flow_sheet_by_quarterly_em
     * 描述: 东方财富-股票-财务分析-现金流量表-按单季度
     * 输入参数: symbol="SH600519"
     */
    public static final String STOCK_CASH_FLOW_SHEET_BY_QUARTERLY_EM = AKSHARE_API_URL + "stock_cash_flow_sheet_by_quarterly_em?symbol=%s";

    // ==================== 同花顺财务报表接口 ====================

    /**
     * 资产负债表-同花顺
     * API: stock_financial_debt_ths
     * 描述: 同花顺-财务指标-资产负债表
     * 输入参数: symbol="000063", indicator="按报告期|按年度|按单季度"
     */
    public static final String STOCK_FINANCIAL_DEBT_THS = AKSHARE_API_URL + "stock_financial_debt_ths?symbol=%s&indicator=%s";

    /**
     * 利润表-同花顺
     * API: stock_financial_benefit_ths
     * 描述: 同花顺-财务指标-利润表
     * 输入参数: symbol="000063", indicator="按报告期|按年度|按单季度"
     */
    public static final String STOCK_FINANCIAL_BENEFIT_THS = AKSHARE_API_URL + "stock_financial_benefit_ths?symbol=%s&indicator=%s";

    /**
     * 现金流量表-同花顺
     * API: stock_financial_cash_ths
     * 描述: 同花顺-财务指标-现金流量表
     * 输入参数: symbol="000063", indicator="按报告期|按年度|按单季度"
     */
    public static final String STOCK_FINANCIAL_CASH_THS = AKSHARE_API_URL + "stock_financial_cash_ths?symbol=%s&indicator=%s";

    // ==================== 公告相关接口 ====================

    /**
     * 沪深京A股公告
     * API: stock_notice_report
     * 描述: 东方财富网-数据中心-公告大全-沪深京A股公告
     * 输入参数: symbol="财务报告", date="20220511"
     * symbol可选: "全部", "重大事项", "财务报告", "融资公告", "风险提示", "资产重组", "信息变更", "持股变动"
     */
    public static final String STOCK_NOTICE_REPORT = AKSHARE_API_URL + "stock_notice_report?symbol=%s&date=%s";

    // ==================== 私有构造函数，防止实例化 ====================

    private AkShareApiConstants() {
        throw new UnsupportedOperationException("This is a utility class and cannot be instantiated");
    }
}
